<%@page import="com.wowangz.cms.common.utils.CodeCreater"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="com.wowangz.cms.common.utils.DataFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.wowangz.cms.dailyoperation.servicemanage.pojo.Charge"%>
<%@ page import="java.util.List"%>
<%-- 引入页面头 --%>



<%@ include file="/pageHead.jsp"%>
<form name="form1" id="form1" action="${systemctx}/sample/saveSample.web" method="post">
	<div class="pageMain">
		<div class="pageTitle"><%=MessageResourcesUtils.getMessage(request, "systemmanage.servicemanagement.title") %><span></span>
		<%=MessageResourcesUtils.getMessage(request, "servicemessage.services.ordermessage.title1") %><span></span>
		<%=MessageResourcesUtils.getMessage(request, "servicemessage.services.ordermessage.view.title") %></div>
		<div class="pageBody">
				<div class="service-wrap">
				<h3>已购买服务</h3>
				<div class="service-box">
				<%
				List<Charge> servicelist = (List<Charge>)request.getAttribute("servicelist");
				for(Charge charge:servicelist){
				%>
			  	<% if(charge.getIsmonth() == SysConstant.YesOrNo.YES && charge.getIsproposed() == SysConstant.YesOrNo.YES){ %>
					<div class="service-list">
						<table class="service-table">
							<tr>
								<th rowspan="2" width="12%">
									<label>
										<input class="check" type="checkbox" disabled="disabled" checked="checked"/><%=charge.getServicename()%>
									</label>
								</th>
								<td width="24%">
									<label>
										<input class="radio" type="radio" checked="checked" disabled="disabled"/>
										按<b class="ico-vol">笔</b>计费：&nbsp;&nbsp;&nbsp;&nbsp;每笔<span class="price"><%=DataFormat.formatAmount(charge.getProposedprice(),2)%></span>元
									</label>
								</td>
								<td width="12%">
										购买<input class="txt-vol" type="text" value="<%=charge.getBuycount()%>" disabled="disabled"/>笔
								</td>
								<td width="35%"></td>
							</tr>
							<tr>
								<td>
									<label>
										<input class="radio" type="radio" checked="checked" disabled="disabled"/>
										按<b class="ico-vol">月</b>计费：&nbsp;&nbsp;&nbsp;&nbsp;每月<span class="price"><%=DataFormat.formatAmount(charge.getMonthprice(),2)%></span>元
									</label>
								</td>
								<td>
									购买<input class="txt-vol" type="text" value="<%=charge.getBuycount()%>" disabled="disabled"/>月
								</td>
								<td>
									开始日期<input class="iss_datebox" type="text" value="<%=charge.getStartdate()%>" disabled="disabled"/>
									结束日期：&nbsp;&nbsp;<span id="<%=charge.getServiceid() %>_enddate"><%=charge.getEnddate()%></span>
								</td>
							</tr>
						</table>
					</div>
					<%}else if(charge.getIsmonth() == SysConstant.YesOrNo.YES){ %>
					<div class="service-list">
						<table class="service-table">
							<tr>
								<th rowspan="2" width="12%">
									<label>
										<input class="check" type="checkbox" disabled="disabled" checked="checked"/><%=charge.getServicename()%>
									</label>
								</th>
								<td width="24%">
									<label>
										<input class="radio" type="radio" checked="checked" disabled="disabled"/>
										按<b class="ico-vol">月</b>计费：&nbsp;&nbsp;&nbsp;&nbsp;每月<span class="price"><%=DataFormat.formatAmount(charge.getMonthprice(),2)%></span>元
									</label>
								<td width="12%">
									购买<input class="txt-vol" type="text" value="<%=charge.getBuycount()%>" disabled="disabled">月</td>
								<td width="35%">
									开始日期<input type="text" class="iss_datebox" value="<%=charge.getStartdate()%>" disabled="disabled"/>
									结束日期：&nbsp;&nbsp;<span><%=charge.getEnddate()%></span>
								</td>
							</tr>
							<tr>
								<td></td>
								<td></td>
								<td></td>
							</tr>
						</table>
					</div>
					<%}else if(charge.getIsproposed() == SysConstant.YesOrNo.YES){ %>
					<div class="service-list">
						<table class="service-table">
							<tr>
								<th rowspan="2" width="12%">
									<label>
										<input class="check" disabled="disabled" checked="checked" type="checkbox"/><%=charge.getServicename()%>
									</label>
								</th>
								<td width="24%">
									<input class="radio" type="radio" checked="checked" disabled="disabled">
									按<b class="ico-vol">笔</b>计费：&nbsp;&nbsp;&nbsp;&nbsp;每笔<span class="price"><%=DataFormat.formatAmount(charge.getProposedprice(),2)%></span>元
								</td>
								<td width="12%">
									购买<input class="txt-vol" type="text" value="<%=charge.getBuycount()%>" disabled="disabled"/>笔</td>
								<td width="35%"></td>
							</tr>
							<tr>
								<td></td>
								<td></td>
								<td></td>
							</tr>
						</table>
					</div>
				</div>
					<%} %>
			<%}%>
				<div class="total-box heji">
					<h4>按笔合计：</h4>
					<ul>
						<li><span class="vol" id="count_num">${countNum}</span>笔</li>
						<li>共<span class="price" id="count_price">${countAmount}</span>元
						</li>
					</ul>
				</div>
				<div class="total-box heji">
					<h4>按月合计：</h4>
					<ul>
						<li><span class="vol" id="month_num">${monthNum}</span>月</li>
						<li>共<span class="price" id="month_price">${monthAmount}</span>元
						</li>
					</ul>
				</div>
				<div class="total-box zongji">
					<h4>总计：</h4>
					<ul>
						<li><span id="total_price">${totalAmount}</span>元</li>
					</ul>
				</div>
			</div>	
		</div>
		<div class="button-group">
				<input type="button" class="btn btn-default" id="butBack" name="butBack" value="<%=MessageResourcesUtils.getMessage(request, "common.button.back")%>" />
			</div>	
	</div>
</form>
<script type="text/javascript">
$(document).ready(function(){
	$('#butBack').click(function() {
		//parent.document.location.reload();
		$.fn.closeIssWindow();
	});
});

</script>
<%-- 引入页面尾 --%>
<%@ include file="/pageFloor.jsp"%>